Pointer-Range Analysis
نویسندگان
چکیده
Array-Range Analysis computes at compile time the range of possible index values for each array-index expression in a program. This information can be used to detect potential out-of-bounds array accesses and to identify non-aliasing array accesses. In a language like C, where arrays can be accessed indirectly via pointers, and where pointer arithmetic is allowed, range analysis must be extended to compute the range of possible values for each pointer dereference. This paper describes a Pointer-Range Analysis algorithm that computes a safe approximation of the set of memory locations that may be accessed by each pointer dereference. To properly account for non-trivial aspects of C, including pointer arithmetic and type-casting, a range representation is described that separates the identity of a pointer’s target location from its type; this separation allows a concise representation of pointers to multiple arrays, and precise handling of mismatched-type pointer arithmetic.
منابع مشابه
Value Range Analysis of Conditionally Updated Variables and Pointers∗
Pointer-based array traversals are often used by C programmers to optimize sequential memory access. However, the use of pointer arithmetic prevents compilers from effectively applying dependence testing and loop analysis for optimization and parallelization. Because pointer variables can be viewed as reference-type induction variables, conventional induction variable recognition and substituti...
متن کاملA Formal Specification of Pointer Analysis Approximations
Exact pointer analysis is an intractable problem, so numerous pointer analysis algorithms have been developed that approximate the exact solution with varying levels of precision. These algorithms employ a variety of algorithmic strategies to describe how to approximate the exact solution. However, there is no formal description of the precision that these algorithms compute. This paper present...
متن کاملA Unifying Framework for Describing the Space of Pointer Analysis Approximations (Extended Version)
Exact pointer analysis is an intractable problem, so numerous pointer analysis algorithms have been developed that approximate the exact solution with varying levels of precision. These algorithms employ a variety of algorithmic strategies to describe how to approximate the exact solution. However, there is no formal description of the precision that these algorithms compute. This paper present...
متن کاملProving Termination of Programs with Bitvector Arithmetic by Symbolic Execution
In earlier work, we developed an approach for automated termination analysis of C programs with explicit pointer arithmetic, which is based on symbolic execution. However, similar to many other termination techniques, this approach assumed the program variables to range over mathematical integers instead of bitvectors. This eases mathematical reasoning but is unsound in general. In this paper, ...
متن کاملParallel Replication-Based Points-To Analysis
Pointer analysis is one of the most important static analyses during compilation. While several enhancements have been made to scale pointer analysis, the work on parallelizing the analysis itself is still in infancy. In this article, we propose a parallel version of context-sensitive inclusion-based points-to analysis for C programs. Our analysis makes use of replication of points-to sets to i...
متن کامل